REM 
REM Run a basic sick_scan_xd api test on Windows 64 (standalone, no ROS required) with a test server emulating a basic LMS5xx device
REM 

if not exist \tmp mkdir \tmp
pushd ..\..

rem set PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\Shared\Python36_64;%ProgramFiles(x86)%\Microsoft Visual Studio\Shared\Python37_64;%PATH%
rem set PATH=c:\vcpkg\installed\x64-windows\bin;%PATH%
rem if exist \Python39 set PATH=\Python39;%PATH%
rem where python
rem python --version
rem python -m venv venv
rem venv\Scripts\activate

REM 
REM Start test server and send LMS 511 scandata testset
REM 

rem start "python ./test/emulator/test_server.py" /min cmd /k python ./test/emulator/test_server.py --scandata_file=./test/emulator/scandata/20210302_lms511.pcapng.scandata.txt --scandata_frequency=20.0 --tcp_port=2112
pushd .\test\emulator
start "python test_server.py" /min cmd /k call run_test_server_forever.cmd --scandata_file=./scandata/20210302_lms511.pcapng.scandata.txt --scandata_frequency=20.0 --tcp_port=2112
popd
@timeout /t 3

REM
REM Start image viewer (simple standalone pointcloud visualization)
REM

start "image_viewer" .\demo\image_viewer_api_test.html

REM 
REM Run sick_scan_xd_api_test (cpp)
REM 

.\build_win64\Debug\sick_scan_xd_api_test.exe ./launch/sick_lms_5xx.launch hostname:=127.0.0.1 sw_pll_only_publish:=False

popd
@pause
